home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2163 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: elna.ethz.ch!usenet
  2. From: Christian Hagmann <chagmann>
  3. Newsgroups: comp.lang.c
  4. Subject: Indexed addressing mode on MIPS R8000
  5. Date: 19 Jan 1996 16:36:49 GMT
  6. Organization: Swiss Federal Institute of Technology (ETHZ)
  7. Message-ID: <4dohb1$ccr@elna.ethz.ch>
  8. NNTP-Posting-Host: tardis-a14.ethz.ch
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (X11; I; SunOS 5.4 sun4c)
  13. X-URL: news:comp.lang.c
  14.  
  15. I'm optimizing a program for a SGI-Workstation with IRIX 6.1, that is written
  16. in C. The Compiler, I use, is the MIPSpro Compiler. 
  17. My problem is the following: 
  18.  
  19. I use some Base-pointers and some Offset-pointers in C. I think, the Compiler
  20. should translate an expression like 'a0=*(b0+off0);' as an indexed addressing
  21. mode 'LDXC1 $fx,$y,$z'. Sometimes it is translated in this way, but sometimes
  22. it is translated in the way, that b0 and off0 become added (Integer-Operation)
  23. and loaded in the Offset addressing mode 'LDC1 $fx,0($q)' with $q=$y+$z. This
  24. disturbs the flow of the programm and makes it slow.
  25. So, my question is:
  26.  
  27. Are there any restrictions in register-register indexed addressing Mode on the
  28. MIPS R8000 or does the IRIX restrict this addressing Mode?
  29.  
  30. If anyone knows a solution for this problem, then send me an e-mail.
  31.  
  32. Thanks
  33.  
  34. Christian
  35.  
  36.